#include <stdio.h>
#include "mvos/mvos_apis.h"
#include "test_apis.h"

mv_s32_t test_osd_start()
{
    MVP_TIMEZONE_INFO_T _stru_tz = {.s16_time_zone = 8, .s16_time_zone_offset = 0};

    mvp_osd_init();
    mvp_osd_time_enable(MV_VIDEO_MAIN_CHN);
    mvp_osd_time_enable(MV_VIDEO_SUB_CHN );
    mvp_osd_show_start(&_stru_tz);
    mvp_osd_rec_enable(MV_VIDEO_MAIN_CHN);
    mvp_osd_rec_enable(MV_VIDEO_SUB_CHN );

    MVP_CUSTOM_OSD_INFO_T _st_info = {
        .s16_x = 0,
        .s16_x = 0,
        .av8_osd_str = "way",
    };

    mvp_osd_custom_str_update(MV_VIDEO_MAIN_CHN, &_st_info);
    mvp_osd_custom_str_update(MV_VIDEO_SUB_CHN , &_st_info);
    mvp_osd_custom_str_enable(MV_VIDEO_MAIN_CHN);
    mvp_osd_custom_str_enable(MV_VIDEO_SUB_CHN );

    return MV_EC_SUCCESS;
}

mv_s32_t test_osd_stop()
{
    mvp_osd_custom_str_disable(MV_VIDEO_MAIN_CHN);
    mvp_osd_custom_str_disable(MV_VIDEO_SUB_CHN );
    mvp_osd_rec_disable(MV_VIDEO_MAIN_CHN);
    mvp_osd_rec_disable(MV_VIDEO_SUB_CHN );
    mvp_osd_time_disable(MV_VIDEO_MAIN_CHN);
    mvp_osd_time_disable(MV_VIDEO_SUB_CHN );
    mvp_osd_show_stop();
    mvp_osd_uninit();
    return MV_EC_SUCCESS;
}